<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<link href="../../../js/bootstrap-3.3.7-dist/css/bootstrap.min.css" rel="stylesheet">
		<link rel="stylesheet" type="text/css" href="../../../css/footer.css" />
		<link rel="stylesheet" type="text/css" href="css/integrel.css" />
		<style type="text/css">
			/*修改底部字体颜色*/
			
			.foot:nth-child(2) {
				color: #e83023;
			}
		</style>
		<script src="../../../js/flexible.min.js" type="text/javascript" charset="utf-8"></script>
	</head>

	<body>
		<div id="wrap">
			<div id="main">
				<div id="header">
					<a id="headImg" href="javascript:history.go(-1)"><img class="headImg" src="../../../images/12.png" /></a>
					<p id="headTitle">积分</p>
				</div>
				<div id="content">
					<!--内容-->
					<div class="content_head">
						<p><img src="../../../images/store/store/ionc/jinbi.png" />总积分 ：<span id="integrel"></span></p>
					</div>
					<div class="content_main">
						<ul>
							<li>
								<a href="integrel_state.html">积分说明<img src="../../../images/store/store/youxuanzhong.png" alt="" /></a>
							</li>
							<li>
								<a href="integrel_detail.html">积分明细<img src="../../../images/store/store/youxuanzhong.png" alt="" /></a>
							</li>
						</ul>
					</div>
				</div>
			</div>

		</div>

	</body>
	<script src="../../../js/jquery-2.2.3.min.js"></script>
	<script src="../../../js/jquery.cookie.js" type="text/javascript" charset="utf-8"></script>
	<script type="text/javascript">
		var tokenReztApp = $.cookie("tokenReztApp");
		if(!tokenReztApp) {
			window.location.href = "../../login/login/login.html";
		}
		$(function() {
			currentyf();
		});

		//用户信息
		var user, role, goodsId;
		//获取当前会员信息
		function currentyf() {
			$.ajax({
				cache: false,
				type: "GET",
				url: "http://47.104.13.109/member-service/auth/current?token=" + tokenReztApp,
				dataType: "JSON",
				async: false,
				error: function(XMLHttpRequest, textStatus, errorThrown) {
					$.removeCookie('tokenReztApp', {
						expires: 7,
						path: '/'
					});
					$.removeCookie("tokenRh", {
						expires: 7,
						path: '/'
					});
					$.removeCookie('memberId', {
						expires: 7,
						path: '/'
					});
					$.removeCookie('roleId', {
						expires: 7,
						path: '/'
					});
					window.location.href = "../../login/login/login.html";
				},
				success: function(data) {
					user = data.loginName;
					role = data.roleList[0].id; //角色
					goodsId = data.id;
				}
			});
		}
		//会员id
		var memberId;
		$.ajax({
			type: "get",
			url: "http://47.104.13.109/member-service/member/mine/member?token=" + $.cookie('tokenRh'),
			async: true,
			success: function(data) {
				console.log(data);
				$.ajax({
					type: "get",
					url: "http://47.104.13.109/integral-service/tfIntegral/" + data.id,
					async: true,
					success: function(data1) {
						console.log(data1);
						$("#integrel").html(data1.integralNum);
					}
				});
			}
		});
		//		$.ajax({
		//			type:"get",
		//			url:"http://47.104.13.109/integral-service/tfIntegral/" + memberId,
		//			async:true,
		//			success:function(data){
		//				console.log(data);
		//				$("#integrel").html(data.integralNum);
		//			}
		//		});
	</script>

</html>








